package com.shop.fegin;

import com.yx.tool.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


import java.io.IOException;

/**
 * @author yinxing
 * @date 2022-08-30
 */
@FeignClient(value = "RABBITMQ-PROVIDER")
public interface RabbitMqClient {
    /**
     * Fegin调用rabbitmq的接扣
     *
     * @param exchange_name
     * @param route_key
     * @return 自定义Response
     * @throws IOException
     */
    @GetMapping("/send")
    Response send(@RequestParam("exchange_name") String exchange_name,
                  @RequestParam("route_key") String route_key,
                  @RequestParam("message") String message) throws IOException;

}
